package com.idealighter.game.group.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.group.manager.GroupMgr;
import com.idealighter.game.group.message.ReqBlackListMsg;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;

@ReqMsgHandler(ModuleMsgIdConstant.Group.BLACK_LIST)
public class ReqBlackListHandler implements ReqMessageHandler {

  @Inject
  private GroupMgr groupMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqBlackListMsg msg = (ReqBlackListMsg) message;
    return groupMgr.blackList(player, msg.getGroupId());
  }
}
